package com.dd.mapper;

import com.dd.entity.Inventory;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dd.entity.InventoryVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 库存表 Mapper 接口
 * </p>
 *
 * @author dhd
 * @since 2024-10-21
 */
@Mapper
public interface InventoryMapper extends BaseMapper<Inventory>{
    Inventory selectAllByProductId(@Param("productId") Integer productId);
    int updateQuantityAndCreatedTime(@Param("quantity") int quantity,@Param("productId") int productId);
    int insertQuantityAndUpdatedTime(@Param("quantity") int quantity,@Param("productId") int productId);

    List<InventoryVO> selectAllInventory(@Param("productName") String productName);

}
